Hi,
I want to remove from all items in the current folder, all users who have "None" access to the items. Here is my code, i am able to modify the rights of a user to "None", but not able to remove him, from the list of users who have access. i am getting error in this line : removeUser(username(ar))
void recurseFolders( Item parentItem )
if ( ( itemType == "Folder" ) || ( itemType == "Project" ) )
// print itemType ":\t"
if ( isDefault( ar ) )
if(username(ar) == "aab1pg1")
string accessStr = r m c d a ""
}
} }
recurseFolders(item(fullName current Folder))
Gsquare - Tue May 21 03:29:34 EDT 2019 |
Re: DXL not working:Remove users with "none" aceess to a module You should say what the error is. In this case its "Incorrect argumenst for function (removeUser)" yes? Looking at the DXL manual I see that "removeUser" is a Discussion thing.
You want the "unset" command in DXL manual chapter "Access controls" section "Controlling access": that would look like:| string ErrMess = unset(parentItem, username(ar))
But wait!! If you remove the "ar" you may mess up the "for ar in all parentItem do" loop. So instead: Skip skpArsToRemove = create() .... put(skpArsToRemove(at, at) // instead of unset Then add this: for ar in skpArsToRemove do { string ErrMess = unset(parentItem, username(ar)) } delete(skpArsToRemove -Louie
|
Re: DXL not working:Remove users with "none" aceess to a module llandale - Wed May 22 20:42:42 EDT 2019 You should say what the error is. In this case its "Incorrect argumenst for function (removeUser)" yes? Looking at the DXL manual I see that "removeUser" is a Discussion thing.
You want the "unset" command in DXL manual chapter "Access controls" section "Controlling access": that would look like:| string ErrMess = unset(parentItem, username(ar))
But wait!! If you remove the "ar" you may mess up the "for ar in all parentItem do" loop. So instead: Skip skpArsToRemove = create() .... put(skpArsToRemove(at, at) // instead of unset Then add this: for ar in skpArsToRemove do { string ErrMess = unset(parentItem, username(ar)) } delete(skpArsToRemove -Louie
Thanks Louie, works perfectly |